package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.List;

/**
 * The type Power.
 */
public class Power extends Common implements Serializable {
    private static final long serialVersionUID = 899851984054956357L;
    @TableId(type = IdType.ID_WORKER_STR)
    private String id;
    /**
     * 菜单名称
     */
    private String url;

    /**
     * 菜单URL
     */
    private String path;
    /**
     * 父id
     */
    @TableField(value = "parentId")
    private String parentId;
    /**
     * 菜单图标
     */
    private String icon;
    /**
     * 组件
     */
    private String component;

    private String name;

    /**
     * Gets power type.
     *
     * @return the power type
     */
    public String getPowerType() {
        return powerType;
    }

    /**
     * Sets power type.
     *
     * @param powerType the power type
     */
    public void setPowerType(String powerType) {
        this.powerType = powerType;
    }

    @TableField(value = "powerType")
    private String powerType;
    @TableField(value = "powerList", exist = false)
    private List<Power> powerList;


    @Override
    public String toString() {
        return "Power{" +
                "id='" + id + '\'' +
                ", url='" + url + '\'' +
                ", path='" + path + '\'' +
                ", parentId='" + parentId + '\'' +
                ", icon='" + icon + '\'' +
                ", component='" + component + '\'' +
                ", name='" + name + '\'' +
                ", powerType='" + powerType + '\'' +
                ", powerList=" + powerList +
                '}';
    }


    /**
     * Gets power list.
     *
     * @return the power list
     */
    public List<Power> getPowerList() {
        return powerList;
    }

    /**
     * Sets power list.
     *
     * @param powerList the power list
     */
    public void setPowerList(List<Power> powerList) {
        this.powerList = powerList;
    }

    /**
     * Gets id.
     *
     * @return the id
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public String getId() {
        return id;
    }

    /**
     * Sets id.
     *
     * @param id the id
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Gets url.
     *
     * @return the url
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public String getUrl() {
        return url;
    }

    /**
     * Sets url.
     *
     * @param url the url
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * Gets path.
     *
     * @return the path
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public String getPath() {
        return path;
    }

    /**
     * Sets path.
     *
     * @param path the path
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public void setPath(String path) {
        this.path = path;
    }

    /**
     * Gets parent id.
     *
     * @return the parent id
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public String getParentId() {
        return parentId;
    }

    /**
     * Sets parent id.
     *
     * @param parentId the parent id
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    /**
     * Gets icon.
     *
     * @return the icon
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public String getIcon() {
        return icon;
    }

    /**
     * Sets icon.
     *
     * @param icon the icon
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public void setIcon(String icon) {
        this.icon = icon;
    }

    /**
     * Gets component.
     *
     * @return the component
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public String getComponent() {
        return component;
    }

    /**
     * Sets component.
     *
     * @param component the component
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public void setComponent(String component) {
        this.component = component;
    }

    /**
     * Gets name.
     *
     * @return the name
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public String getName() {
        return name;
    }

    /**
     * Sets name.
     *
     * @param name the name
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Instantiates a new Power.
     *
     * @param id        the id
     * @param url       the url
     * @param path      the path
     * @param parentId  the parent id
     * @param icon      the icon
     * @param component the component
     * @param name      the name
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public Power(String id, String url, String path, String parentId, String icon, String component, String name) {
        this.id = id;
        this.url = url;
        this.path = path;
        this.parentId = parentId;
        this.icon = icon;
        this.component = component;
        this.name = name;
    }

    /**
     * Instantiates a new Power.
     *
     * @author overlook
     * @date 2022 -04-16 20:31:11
     */
    public Power() {
    }
}

